
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreAdvanceRequest struct {

	ProductId string `json:"product_id" form:"product_id"`

	Image string `json:"image" form:"image"`

	Images string `json:"images" form:"images"`

	Title string `json:"title" form:"title"`

	Info string `json:"info" form:"info"`

	Price string `json:"price" form:"price"`

	OtPrice string `json:"ot_price" form:"ot_price"`

	Sort string `json:"sort" form:"sort"`

	Stock string `json:"stock" form:"stock"`

	Sales string `json:"sales" form:"sales"`

	UnitName string `json:"unit_name" form:"unit_name"`

	StartTime string `json:"start_time" form:"start_time"`

	StopTime string `json:"stop_time" form:"stop_time"`

	AddTime string `json:"add_time" form:"add_time"`

	Status string `json:"status" form:"status"`

	IsDel string `json:"is_del" form:"is_del"`

	Type string `json:"type" form:"type"`

	Deposit string `json:"deposit" form:"deposit"`

	PayStartTime string `json:"pay_start_time" form:"pay_start_time"`

	PayStopTime string `json:"pay_stop_time" form:"pay_stop_time"`

	DeliverTime string `json:"deliver_time" form:"deliver_time"`

	Num string `json:"num" form:"num"`

	TempId string `json:"temp_id" form:"temp_id"`

	Quota string `json:"quota" form:"quota"`

	QuotaShow string `json:"quota_show" form:"quota_show"`

	OnceNum string `json:"once_num" form:"once_num"`

}

func (r *StoreAdvanceRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreAdvanceRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"product_id": "required",

		"image": "required",

		"images": "required",

		"title": "required",

		"info": "required",

		"price": "required",

		"ot_price": "required",

		"sort": "required",

		"stock": "required",

		"sales": "required",

		"unit_name": "required",

		"start_time": "required",

		"stop_time": "required",

		"add_time": "required",

		"status": "required",

		"is_del": "required",

		"type": "required",

		"deposit": "required",

		"pay_start_time": "required",

		"pay_stop_time": "required",

		"deliver_time": "required",

		"num": "required",

		"temp_id": "required",

		"quota": "required",

		"quota_show": "required",

		"once_num": "required",

	}
}

func (r *StoreAdvanceRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreAdvanceRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreAdvanceRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
